The present application is related to, and claims priority from, Japanese Patent Application Hei. 9-282031, the contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to an optical information reader for optically reading information from a display pattern, such as a two-dimensional code or a bar code, and a computer-readable recording medium for storing a program for realizing the functions of the optical information.
2. Discussion
An optical information reader for optically reading a display pattern, such as a bar code or a two-dimensional printed code, for article identification is known.
The optical information reader has a light emitting device, such as an LED, in a casing to illuminate a display pattern to which a reading port of the optical information reader is pointed. Light is reflected from the display into the casing, and an image is read by an image forming lens or a CCD. Information expressed by the display pattern is decoded from distribution of dark and light parts.
There is, however, a case in which a part of a display pattern, printed on a medium such as a lustrous paper, is read as a light (white) part due to mirror reflection depending on an incident angle of illumination and irrespective of black and white code-recorded parts, so that the display pattern cannot be correctly read.
In such a case, since the optical information reader itself cannot discriminate that the object to be read is abnormal, the operator has to repeat, by trial and error, by moving the optical information reader or changing the reading angle to perform the reading operation in a position and at an angle such that the mirror reflection does not influence the reading, thereby decreasing operating efficiency.
As an apparatus for reconstructing an original image from an image which is abnormal due to the mirror reflection, a pattern detecting apparatus for detecting images from two directions with respect to the same object and synthesizing the images, thereby eliminating mirror reflection regions, is known (see, for example, U.S. Pat. No. 4,654,583).
The pattern detecting apparatus, however, requires two expensive image reading means such as CCDs, thereby increasing manufacturing costs. Since images read from different directions are synthesized, the same images are not obtained. Consequently, even if the read images are synthesized, a positional error occurs and the mirror reflection regions cannot be completely eliminated. Especially, a bar code and a two-dimensional code require high accuracy in position detection of the bars or cells as elements, so that the conventional technique cannot be applied.
In the conventional technique, although it is sufficient to perform an image process so that images seen from the same direction are obtained, the operation of the image process is complicated, and causes delay in the overall reading process.
It is an object of the invention to provide an optical information reader to promptly eliminate mirror reflection regions with high accuracy without requiring a plurality of expensive image reading means.
The present invention provides such a reader. More particularly, the present invention provides an optical information reader that irradiates a display pattern with light selected from a predetermined irradiation direction. The reader then reads an image by light reflected from the display pattern, and discriminates whether mirror reflection regions exist or not in the read image. When mirror reflection regions are discriminated, the image reader then reads a new image by light irradiated from an alternative irradiation direction, and compensates for the mirror reflection regions. The image is read a predetermined number of times until an accurate reading is realized, or until the number of readings reaches a set limit, at which time an error signal is generated.